![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Session latency monitor. More...
#include <latency_monitor.h>
Public Member Functions | |
LatencyMonitor (const packet::SortedQueue &queue, const Depacketizer &depacketizer, ResamplerReader *resampler, const LatencyMonitorConfig &config, core::nanoseconds_t target_latency, size_t input_sample_rate, size_t output_sample_rate) | |
Constructor. More... | |
bool | valid () const |
Check if the object was initialized successfully. More... | |
bool | update (packet::timestamp_t time) |
Update latency. More... | |
Session latency monitor.
Definition at line 60 of file latency_monitor.h.
roc::audio::LatencyMonitor::LatencyMonitor | ( | const packet::SortedQueue & | queue, |
const Depacketizer & | depacketizer, | ||
ResamplerReader * | resampler, | ||
const LatencyMonitorConfig & | config, | ||
core::nanoseconds_t | target_latency, | ||
size_t | input_sample_rate, | ||
size_t | output_sample_rate | ||
) |
Constructor.
Parameters
queue
and depacketizer
are used to calculate the latencyresampler
is used to set the scaling factor, may be nullconfig
defines various miscellaneous parameterstarget_latency
defines FreqEstimator target latency, in samplesinput_sample_rate
is the sample rate of the input packetsoutput_sample_rate
is the sample rate of the output frames bool roc::audio::LatencyMonitor::update | ( | packet::timestamp_t | time | ) |
Update latency.
bool roc::audio::LatencyMonitor::valid | ( | ) | const |
Check if the object was initialized successfully.